mwait-idle: correct/improve BXT support
authorJan Beulich <jbeulich@suse.com>
Mon, 1 Aug 2016 16:21:37 +0000 (18:21 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 1 Aug 2016 16:21:37 +0000 (18:21 +0200)
commitfeb7747be7fab49d929266e8b775ebb04198340a
tree34dcd58e3d084d9a8c3810fe16a93c0638084f54
parent2d12afe43a5e52a7ac4d2d633caf657d0eb10dc1
mwait-idle: correct/improve BXT support

Linux commit 5dcef69486 ("intel_idle: add BXT support") added an
8-element lookup array with just a 2-bit value used for lookups. As per
the SDM that bit field is really 3 bits wide. Since the top two array
entries are zero, deal with the resulting invalid (zero) values by
moving the zero-MSR-value check into irtl_2_usec() and having that
function's caller check its result instead.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
[Linux commit: 3451ab3ebf92b12801878d8b5c94845afd4219f0]
[Linux commit: bef450962597ff39a7f9d53a30523aae9eb55843]
xen/arch/x86/cpu/mwait-idle.c